package student.aistar.day13;

import java.io.*;

public class FileCopyReaderDemo {
    public static void main(String[] args) throws Exception {
        test01("src\\student\\aistar\\day13\\Book.java", "src\\student\\aistar\\day13\\Book_副本.java");
    }

    /**
     *
     * @param src       源文件路径
     * @param target    目标路径
     */
    private static void test01(String src, String target) throws Exception {
        BufferedReader in = new BufferedReader(new FileReader(src));
        PrintWriter out = new PrintWriter(new FileWriter(target));

        String len = null;
        int ch = -1;
        while(true){
//            len = in.readLine();
            if(ch == -1)
                break;
            out.println((char)(ch));
        }

        in.close();
        out.close();
    }

}
